.logicworld-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  background: #f8f9fa;
  min-height: 100vh;
}

.logicworld-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.logicworld-header h1 {
  margin: 0 0 10px 0;
  font-size: 2.5em;
  font-weight: 700;
}

.logicworld-header p {
  margin: 0;
  font-size: 1.1em;
  opacity: 0.9;
}

.logicworld-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* 状态面板 */
.status-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.status-card, .stats-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.status-card h3, .stats-card h3 {
  margin: 0 0 20px 0;
  color: #2c3e50;
  font-size: 1.3em;
  font-weight: 600;
}

.status-indicators {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
}

.status-item.healthy {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.status-item.warning {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.status-item.error {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.status-icon {
  font-size: 1.2em;
}

.status-actions {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #545b62;
  transform: translateY(-1px);
}

/* 统计信息 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.stat-value {
  display: block;
  font-size: 2em;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9em;
  color: #6c757d;
}

/* 聊天面板 */
.chat-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  height: 600px;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
}

.chat-header h3 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1.3em;
  font-weight: 600;
}

.chat-header p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9em;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.user-message .message-avatar {
  background: #007bff;
  color: white;
}

.assistant-message .message-avatar {
  background: #28a745;
  color: white;
}

.system-message .message-avatar {
  background: #ffc107;
  color: white;
}

.message-content {
  flex: 1;
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.user-message .message-content {
  background: #007bff;
  color: white;
  margin-left: auto;
  margin-right: 0;
  max-width: 70%;
}

.assistant-message .message-content {
  background: #f8f9fa;
  border-color: #28a745;
}

.system-message .message-content {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.message-text {
  white-space: pre-wrap;
  line-height: 1.5;
}

.message-time {
  font-size: 0.8em;
  opacity: 0.7;
  margin-top: 4px;
}

.loading-message {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-dots::after {
  content: '';
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* 快速操作 */
.quick-actions {
  padding: 16px;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.quick-actions h4 {
  margin: 0 0 12px 0;
  font-size: 1em;
  color: #2c3e50;
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-btn {
  padding: 6px 12px;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 16px;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-btn:hover:not(:disabled) {
  background: #007bff;
  color: white;
}

.quick-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 输入区域 */
.chat-input {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e9ecef;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
}

.chat-input input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.send-btn {
  padding: 12px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 24px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.send-btn:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .logicworld-content {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .status-actions {
    flex-direction: column;
  }
  
  .chat-panel {
    height: 500px;
  }
  
  .quick-buttons {
    flex-direction: column;
  }
  
  .chat-input {
    flex-direction: column;
    align-items: stretch;
  }
}
